package com.zlb.app.modules.auth.controller;

import cn.hutool.log.StaticLog;
import com.zlb.app.common.entity.R;
import com.zlb.app.modules.auth.entity.vo.LoginVO;
import com.zlb.app.modules.auth.service.IAuthService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 用户表 控制层
 * @Author zWX1367238
 * @Date 2024-09-05 14:43:28
 */
@RestController
@RequestMapping("/auth")
@RequiredArgsConstructor
@Api(tags = "认证相关接口")
public class AuthController {

    private final IAuthService authService;

    @PostMapping("/login")
    public R login(@RequestBody LoginVO loginVO) {
        return R.ok(authService.login(loginVO));
    }

    @GetMapping("/test")
    public R test() {
        StaticLog.info("访问草稿");
        return R.ok();
    }

}
